package com.city.domain.pub;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 统计信息
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-25 16:28
 */
@Entity
@Table(name = "pub_count", schema = "city", catalog = "")
public class PubCount {
    private Integer id;
    private String name;
    private Integer countRes;
    private String province;
    private String city;
    private String county;
    private String town;
    private String village;
    private String department;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy= GenerationType.AUTO)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Basic
    @Column(name = "count_res")
    public Integer getCountRes() {
        return countRes;
    }

    public void setCountRes(Integer countRes) {
        this.countRes = countRes;
    }
    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }
    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    @Basic
    @Column(name = "county")
    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }
    @Basic
    @Column(name = "town")
    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }
    @Basic
    @Column(name = "village")
    public String getVillage() {
        return village;
    }

    public void setVillage(String village) {
        this.village = village;
    }
    @Basic
    @Column(name = "department")
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PubCount pubCount = (PubCount) o;
        return Objects.equals(id, pubCount.id) &&
                Objects.equals(name, pubCount.name) &&
                Objects.equals(countRes, pubCount.countRes) &&
                Objects.equals(province, pubCount.province) &&
                Objects.equals(city, pubCount.city) &&
                Objects.equals(county, pubCount.county) &&
                Objects.equals(town, pubCount.town) &&
                Objects.equals(village, pubCount.village) &&
                Objects.equals(department, pubCount.department);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, countRes, province, city, county, town, village, department);
    }

    @Override
    public String toString() {
        return "PubCount{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", countRes=" + countRes +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", county='" + county + '\'' +
                ", town='" + town + '\'' +
                ", village='" + village + '\'' +
                ", department='" + department + '\'' +
                '}';
    }
}
